-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ScopedJobThreadPtr class to be used with JobThread #4275
base: 25.lts.1+
Are you sure you want to change the base?
Conversation
67a8d3b
to
30e7e60
Compare
@borongc is it possible for you to help me review the part in this PR where all changes to Schedule() made during the scoped_ptr<> to unique_ptr<> migration is reverted? |
30e7e60
to
5a37123
Compare
@osagie98 @sideb0ard is it possible for you to take a look at this one? |
5a37123
to
1808d62
Compare
looking now, re-reading bug history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From reading Xiaoming and Jelle's comments, specifically https://b.corp.google.com/issues/372515171#comment11
this new ScopedJobThreadPtr has the behavior we require in the correct order, i.e. finish jobs, terminate thread, set pointer to null.
However, as this PR and bug are still open, we appear to still have some lingering reservations.
Suggestion:
- Can we first add a new test to job_thread_test.cc 'ScheduleJobDuringShutdown', which specifically triggers the DCHECK listed in https://b.corp.google.com/issues/372515171#comment1
This new test should FAIL with the current implementation. - Then, secondly, run the new test with this PR, which should PASS. If it does pass, then we can be sure it's solved the issue as we currently understand it.
I've created PR for ScheduleJobDuringShutdown test: #4864 |
b/372515171